package com.shengyuan.manage_os.old.ying.erpm;

import com.shengyuan.manage_os.R;
import com.shengyuan.manage_os.old.ying.erpm.util.Utility;

import android.os.Bundle;
import android.widget.EditText;
import android.widget.TextView;

public class Actual_Form_Car_Setting extends BasePrinterActivity {

	private String T_Name , mTitle;
	private EditText editText_car_content;
	private TextView Text_Setting_Title;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.actual_form_car_setting);
		if (getIntent().getExtras()!=null) {
			T_Name = getIntent().getExtras().get("T_Name").toString();
			mTitle = getIntent().getExtras().get("mTitle").toString();
		}
		Text_Setting_Title = (TextView) findViewById(R.id.Text_Setting_Title);
		editText_car_content = (EditText) findViewById(R.id.editText_car_content); 
		if (editText_car_content!=null) {
			String text = MainApplication.pShareUtil.ReadParam(T_Name);
			editText_car_content.setText(text);
		}
		if (Text_Setting_Title!=null) {
			Text_Setting_Title.setText(mTitle);
		}
	}

	@Override
	protected void PrintingContent() {
		String Value = editText_car_content.getText().toString();
		if ( T_Name.equals("T_ZIYOUSHILUN")) {
			MainApplication.pShareUtil.WriteParam(T_Name, Value);
		}else {
			Utility.MessageBox(this,"你没有权限修改，请联系上级主管，在系统后台配置你今天的工作内容!");
		}
		
		finish();
	}
}
